Skip to content

Conversation

ZuseZ4
Copy link
Member

@ZuseZ4 ZuseZ4 commented Oct 5, 2025

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Oct 5, 2025

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Oct 5, 2025

```sh
<path/to/opt> out.ll -load-pass-plugin=/path/to/llvmenzyme-19.so -passes="enzyme" -s
<path/to/opt> out.ll -load-pass-plugin=/path/to/build/<target-tripple>/stage1/lib/libEnzyme-21.so -passes="enzyme" -enzyme-strict-aliasing=0 -s
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tripple -> triple

also LLVMEnzyme-XX is the correct one here, not libEnzyme

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly enough libEnzyme works! From my local shell:

~/path/to/rust2/build/x86_64-unknown-linux-gnu/llvm/build/bin/opt mod.ll -load-pass-plugin=/path/to/rust2/build/x86_64-unknown-linux-gnu/stage1/lib/libEnzyme-21.so -passes="enzyme" -enzyme-strict-aliasing=0 -o rel3.ll -debug-pass-manager -S

Which is good, because we don't build LLVMEnzyme anymore in our default rust+autodiff setup.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not guaranteed to work and may break if the llvm plugin linking interfaces/libraries change [and may also be system dependent]

probably not wise to put in the docs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a warning. The problem about LLVMEnzyme is that it's not build by default and I think it also requires LLVM's plugin infrastructure, which we don't enable in our LLVMs by default. I'll leave it for now and bring it up on the rust side when we discuss how to distribute Enzyme in CI.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still really skeptical of putting something into the docs that is not supposed to work (but may only work by accident).

@ZuseZ4 ZuseZ4 merged commit 7002eb0 into main Oct 5, 2025
1 check passed
@rustbot rustbot removed the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Oct 5, 2025
@tshepang tshepang deleted the autodiff-updates branch October 5, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants